package com.starlink.model.dtomapper;

import com.starlink.model.domain.MallBooksDO;
import com.starlink.model.request.save.MallBooksSaveRequest;
import com.starlink.model.request.MallBooksRequest;
import com.starlink.model.vo.MallBooksVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface MallBooksDtoMapper {

    MallBooksDtoMapper INSTANCE = Mappers.getMapper(MallBooksDtoMapper.class);

    /**
    * DO to VO
    * @param mallBooksDO
    * @return
    */
    MallBooksVO do2VO(MallBooksDO mallBooksDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    MallBooksDO request2DO(MallBooksRequest request);

    /**
     * request to DO
     * @param request
     * @return
     */
    MallBooksDO request2DO(MallBooksSaveRequest request);
}
